using System;

namespace SyncSocketModuleCore.SyncSocketModule
{
	public interface IPacketHandler
	{
		bool BatchReadPacket(int readStartWrodAddr, int readWordCount, int deviceCode, out int readCmdAckPacketSize, out byte[] readCmdPacket, out string errorText, int DBBlock = 0);

		bool BatchReadResponse(byte[] recvedByte, int recvedByteCount, int respectRecvByteCunt, int accessWordCount, ref byte[] copyTarget, out string errorText);

		bool BatchWritePacket(int[] writeWordData, int writeStartWordAddr, int writeWordCount, int deviceCode, out int writeCmdAckPacketSize, out byte[] writeCmdPacket, out string errorText, int DBBlock = 0);

		bool BatchWriteResponse(byte[] recvedByte, int recvedByteCount, int respectRecvByteCunt, int accessWordCount, out string errorText);

		bool IsNeedNodeSync();

		bool IsReqeustSync();

		bool ReadNodeAddress(out byte[] readCmdPacket, out string errorText);

		bool ReadNodeResponse(byte[] recvedByte, int recvedByteCount, int respectRecvByteCunt, int accessWordCount, out string errorText);
	}
}